ForageFeeder: A low-cost open source feeder for randomly distributing food

Automated feeders have long fed mice, livestock, and poultry, but are incapable of feeding zoo animals such as gorillas. In captivity, gorillas eat cut vegetables and fruits in pieces too large to be dispensed by automated feeders. Consequently, captive gorillas are fed manually at set times and locations, keeping them from the exercise and enrichment that accompanies natural foraging. We designed and built ForageFeeder, an automated gorilla feeder that spreads food at random intervals throughout the day. ForageFeeder is an open source and easy to manufacture and modify device, making the feeder more accessible for zoos. The design presented here reduces manual labor for zoo staff and may be a useful tool for studies of animal ethology.

. A) Hypothesized time course of energy intake for gorillas fed manually (top) and the forage feeder. Energy graphs adopted from [3]. B) Proposed automated feeder. C) Envisioned applications of the feeder. Automated feeders designed by Oh et al. release small amounts of food in an enclosed area [7]. To build a feeder that spreads feed over a larger area, we modified the design of Oh et al. and combined it with the food spreading capabilities of a typical deer feeder [8]. While designed for gorillas, we believe the device could be applied to any animal that forages over a large area, including elephants [9], fruit bats [10], and mule deer [11]. The ability to program the device to feed at different intervals may be useful in studies of animal behavior, growth, and nutrition. For example, Ali and Wooton studied the growth of stickleback fish due to feeding at both regular and random intervals [12].
We designed our feeder to be built frugally and open source so that it can be used by non-profit organizations such as zoos. Recent frugal devices have been proposed such as foldscope and paperfuge [13,14], but frugal science has yet to gain momentum in zoological organizations [15]. Frugal science and open source designs are starting to make waves in the conservation biology community through the field of Conservation Technology (CT), which encapsulates technological developments for wildlife and environmental conservation [16,17]. Some of the major goals of CT are to improve outdated equipment, increase accessibility to tools, and use modern technology to address conservation problems in entirely new ways [18,2]. CT can be used as a less invasive method for understanding wildlife through various methods like data collection, monitoring, and automatic wildlife distribution [19]. Previous conservation technology works include the AudioMoth, an acoustic monitoring device, inexpensive camera traps, but there are few examples of animal feeders [18].
ForageFeeder has a total cost of approximately $400 with a majority of the cost associated with the instrumentation and motor control. We designed it to be impenetrable to squirrels, raccoons, and foxes, but this ability still remains untested. Non-electrical components were laser cut, 3D -printed, or inexpensively store bought. Electrical components were built from open-source parts. The LCD screen and buttons were optional, but helped to create a user-interface that could be more easily operated.

Hardware description
In this section, we present the building process for the feeder. Supplemental Video 1 shows a time-lapse video of constructing the entire device from scratch, which takes approximately 2 h. Most components are designed to fit together easily and have minimum points of attachment and need for adhesive. This reduces the amount of pieces in the design and overall complexity of construction.
The design goals for the ForageFeeder include: Total cost of approximately $400 Assembly in under 3 h Accessible maintenance Impenetrable to rodents and other undesired animals Typical feeders are designed to distribute small, dry, consistently-shaped grains that can easily flow. However, gorilla feed consists of large irregular chunks of fruit and vegetables whose rough edges and wet surfaces cause jamming and sticking. In a traditional feeder, gorilla feed would cluster into immobile and inconsistent units of food and probably jam the feeder. In the ForageFeeder design, the feed is separated into individual servings, solving the jamming and portion control issues. The device is composed of the feed bucket, electronics housing, and associated wiring shown in Fig. 1. We discuss each in turn. The feeder bucket consists of a 5-gallon (19 L) bucket, a metal funnel, an encoded motor, 3D-printed components, and laser-cut components. The feed bucket stores and separates feed into servings. In a feed cycle, the gate rotates and releases a serving of feed, which then falls from the feed bucket onto a toothed flywheel. When suspended 10 m off the ground, feed is thrown across a circular area with a radius of 10 m. Cycles are activated at random intervals on a timescale chosen by the user.
The electronics housing consists of laser-cut acrylic components, a motor, and associated electronics. Pieces are secured with nuts and bolts and waterproofed with silicon caulk.
The motors and Arduino Uno are powered by separate power banks. Power banks are reliable lithium (LiPo) batteries and do not have the danger of undercharging or overcharging the batteries. A full charge of the battery pack powering the motors can handle 24 feed cycles and can remain active for 24 h without charging or swapping the batteries out. Battery packs may conveniently be removed by opening the sliding panel at the back of the electronics box and unplugging their USB connections. In the next section, we present our detailed design choices.

Feed Housing
The feed housing is a 5-gallon deer feed bucket with 19 cm-tall cylindrical dividers (12.7 cm x 19 cm acrylic panels) that separate the volume into eight wedges. Of the eight wedges of space, only seven wedges are filled with feed because one wedge acts as the initial ''closed" position for the device. With each slot holding 1.5 L of feed, the seven wedges hold a total of 8 L.
The divider panels sit atop a circular acrylic panel with a wedge-shaped cutout that acts as a gate. While in the closed position, the cutout aligns with an empty wedge blocked off by the motor holder. In this position, there are no open spaces for the feed to fall through. To distribute feed, the panel rotates, shifting the cutout slot to a wedge filled with feed, which is subsequently released. Rotation is powered by an encoded DC motor held in place by a motor holder. A metal funnel is placed at the bottom of the bucket to help guide feed to the exit hole. To support the weight of heavier feed, M3 screws are screwed into the metal bucket right under the height of the panel gate (Fig. 2).

Electronics Housing
The electronics housing hangs directly under the feed housing with four M6x300 fully threaded bolts. The housing is made of acrylic, silicon sealant, and cyanoacrylate. Inside the housing are the electronic components, interface components, and batteries. An Arduino Uno contains all the code to run the device. On top of the housing is a high-speed motor with a toothed flywheel that launches feed outwards during feeding.
Protruding on the front side of the housing is an LCD interface and controls for adjusting input settings. The manual controls include three buttons. As a safety precaution, an LED light flashes 10 min prior to all motors activating.

Motor Specifications
Two motors generate the forces necessary to distribute food across a large area. The first motor, M1, is located directly below the feed and slowly spins the acrylic disk 45 degrees between each food distribution cycle. The hole in the disk lines up with one of the eight feeding compartments filled with food, allowing the food to fall down into the lower portions of the device. The motor has an appropriate accuracy and maximum torque in order to rotate the acrylic disk at the required speed and precision for successful deployment. Our motor had a torque of 300 kgf-cm, sufficient to spin the acrylic disk while supporting a full 3-kg load of feed. For the feed to be distributed properly, the disk should spin at least 16 rpm. Our chosen motor spins at 23 rpm, so we lowered the speed of rotation through pulse width modulation (PWM) from the Arduino Uno. In order to accurately spin the disk, an encoder is attached to the shaft of the motor. Every time the shaft makes one rotation, the encoder sends signals to the Arduino which counts the rotations. Using simple PID control, we spin the motor the needed 45 degrees.
The second motor, M2, spins the metal flywheel to launch the feed. We chose this motor so that it can give the flywheel enough torque to distribute feed up to 10 m from the device. This motor has a max rotational speed of 12,000 rpm and pulls at most 2.4 amps of current when in use by the feeder. PWM signals from the Arduino Uno are also used to control the speed of this motor. (See Table 1).

Electronics and Controls
The Arduino microcontroller is the brain of the device. A custom Arduino Shield printable circuit board (PCB) was designed using KiCad and printed using JLCPCB (Shenzhen JIALICHUANG Electronic Technology Development Co.,Ltd). A protoboard-based circuit may also act as a shield, which easily and compactly connects the Arduino to all the peripherals and motors. The Arduino Shield PCB is like a middle man that relays information between the microcontroller and the other devices. The Arduino Shield also mechanically binds different electronic modules with screws or male -female connections making the device more durable and the parts easy to replace. By sending the Gerber file to a manufacturer, the Arduino Shield PCB may be created and delivered in a timely manner and at an affordable price. The Arduino Shield serves as a structural link between the Arduino and peripheral devices like the LCD display and buttons, preventing wires from becoming loose as ForageFeeder is moved. The male pins from the display fit tightly into the female connectors on the Arduino Shield. The female connects on the Arduino also fit into the male pins on the Arduino Shield. Using screws, we physically secured these peripherals to the Arduino Shield, which in turn was connected to the body of the device. Using screw terminals connects the Arduino to other devices securely. Other options like jumper cables going directly into the Arduino would not be as reliable.
We select a dual motor driver because it simplifies the wiring management along with making it more compact. The driver is a Cytron 10A dual channel bi-directional DC motor driver that can handle high peak current draws of 15 amp from the motor.

Software Overview
The software handles everything from controlling the motors to timing the wait between feedings. The software is located in an Arduino Uno, a popular microcontroller that when powered starts executing the file in its Flash Memory. The executed code follows the format of calling a setup function when booted and then looping indefinitely in a loop function. However, a simple loop function would not work for our complex problem, so we use a state machine that segments the different actions the device takes. We describe the code segments in turn.
When the device is turned on and the Arduino is powered, the device goes into a configuration state. The configuration state takes inputs from three buttons and outputs information to the LCD display. In the case of the gorilla feeder, the number of feedings and hours active are displayed on separate lines. Two buttons are responsible for changing these variables. The third button changes the state from configuration mode to the setup state. During the setup state, the device stays idle for one hour to allow for the device to be secured in its intended location.
By pressing the third button, users can go back to the configuration state. After an hour, the state machine switches to the active wait state where the device waits 10 min before distributing feed. During this state, a red warning LED shines to users, after which the state machine switches to the active state where the food is distributed.
To distribute the feed, the Arduino sends out pulse width modulation signals (PWM) to the motor driver to drive the M2 motor attached to the toothed flywheel. Increasing the motor speed increases the distribution radius of the feed. A PWM signal also moves the slow spinning motor in order to drop the food in a wedge. Once the device goes through all its cycles, it then goes to the low power mode where it goes into deep sleep to preserve battery.
The main file that runs on the Arduino Uno is written in C++. Our code is written in a low-level language that is then compiled and uploaded to the Arduino Uno using the Arduino IDE. The serial rate is set at 9600 bits per second. We also use an library, the Liquid Crystal library. This library aids with the communication between the arduino uno and the LCD display. To properly interpret button presses, a debounce function ensures an inconsistent button press doesn't cause accidental double clicks. The debouncing function records the time a button is initially pressed, checks if the button remains pressed after a 100 ms delay, then waits for the button to be unpressed to execute the button's command. Schematic.drl is the drill file that describes the mounting and via hole positions and sizes. This file is used in the manufacturing processes. Schematic-job.gbrjob is the Gerber job file used in the manufacturing process to etch the routes in the PCB.

Build instructions
Prior to assembly, collect all materials, including cut pieces, 3D-printed pieces, nuts/bolts/washers, and adhesives/sealants. Thread the motor with encoder's wires through the cord protector and cut to length (see Table 2).
A 2. Attach the motor holder to the bucket (Fig. 4).
A. Pair one M5 wave washer (or lock/spring washer) with one M5 hexnut. Drop them together into the cut out on the side of the motor holder. Use a small screwdriver to make sure that the washer and nut are snug inside the cut out. Also ensure that the holes align with the screw path. These pair of wave washers and hexnuts will act as the backing of the top screw attaching the motor holder to the bucket. as seen in (Fig. 7). The top panel should sit at least 12 cm from the bottom of the bucket. NOTE: Add a small dot of cyanoacrylate to each nut and bolt to prevent loosening. E. Wire all wires according to the wiring guide and the electronics housing. F. Insert the inside panels in the electronics housing. This will help divide the electronics from the batteries. G. Attach the top panel (with bucket) onto the electronics housing. Make sure that the tube of wires is on the side with the door. The wires will go through the side of the door. Seal all edges of the top panel with silicon caulk. Extra tape can be used to secure the two together 6. Set the divider system (Fig. 8).
A. Set the slot cut panel onto the M1 motor system and align the four holes near the center of the panel. Insert one M3 screw into each hole. They do not need to be tightened, just placed flush against the panel. B. Place the borders and the center divider onto the slot-cut panel. The borders round the side of the bucket while the center divider sits in the center. The narrow end of the center divider is flush with the panel. NOTE: Ensure that each gap in the borders aligns with each gap in the center divider. C. Insert each acrylic divider into each gap of the divider system. D. Rotate the divider system so that one divided wedge aligns with the edges of the motor holder.
NOTE: Do not rotate the slot cut panel. It is electronically calibrated during every start-up.

Operation instructions
Device Usage 1. Turn on and plug in two battery packs. Charge if power indicators are low. Important: Turn on and slowly double click Anker PowerBank's power button to enter low power mode. One of the LEDs on the button should turn from blue to green. Make sure the other BatteryPack is switched on (LEDs should be green) (See Fig. 9) 2. Now, the display should display the calibration scene. During calibration, the rightmost two buttons under the display may be used to calibrate the acrylic disk underneath the dividers so that the opening is lined up onto the black plastic armature. By pressing the middle button (Toggle), the acrylic disk spins counterclockwise. Pressing the rightmost button (Add) makes the acrylic disk spin clockwise. 3. The feed can now be filled into the slots on the top of the device. The slot that faces the triangular opening in the acrylic disk should be left empty. 4. Pressing the leftmost button (Enter button) ends the calibration and advances the device to the next stage. 5. Now, the display should be on and showing the Food Cycles and Total Hours options.
(a) The line with asterisks (*) indicates the currently selected option. Pressing the middle button (Toggle), to change the selection. (b) The rightmost button (Add button) increases the value of the currently selected option (c) The left most button (Enter button) will activate the device and advance to the next stage. Display items include: Food Cycles: The number of clusters of food to be distributed (maximum is seven) Total Hours: The total hours the device is feeding. Maximum is 12 h, excluding the one hour of idle time given to set up the device. 6. After pressing the leftmost button to activate the device, a 60-min countdown begins on the display. During these 60 min, pressing the leftmost button returns the user to the Food Cycle and Total Hours setup screen. 7. After the 60 min wait time, the device goes through the feeding time cycles. 8. When the device is going through feeding cycles, a red LED on the face of the electronics box will light up to indicate that food will be distributed within 10 min. Do not touch the device during this time.   9. Once the feeding is done, the batteries should be unplugged or turned off to disable the device. The batteries should be recharged or replaced if they are low. NOTE: Before each deployment, check for screws loosened by motor vibration.

How Feeding Time are Distributed
To calculate the time for each feeding, divide the total hours by the number of food cycles. For example, two total hours and seven food cycles yields 2/ 7 17 min per feeding.

Device Care and Cleaning
All components in the bucket are removable for cleaning. Do not disassemble the upper motor system or detach from the bucket once built. Instead, remove all other components and rinse the inside of the bucket. Wipe the outside of the Electronics Housing to clean. The toothed flywheel can be removed and reattached for cleaning.

Validation and characterization
Currently the capabilities of the device include: dispersing cubic-inch (2.5 cm length) food chunks dispersing in a 10-m radius operable for approximately 13 h at highest load We endeavored to build an automated feeder that can be easily reproduced and modified. ForageFeeder is open-source, meaning that all our work is documented and publicly available to be used or modified. In addition, collaboration between users is also possible through the OSF (open source framework) page where all the software code is stored. We kept the device safe and robust by keeping all the sensitive electronics in a water resistant portion of the device that remains accessible for maintenance and cleaning. For the power, we used battery packs with built in safeties and circuitry to control charging and shutting off the lithium cells to reduce the risk of fires if a short circuit or excessive current draw occurs. The batteries powering the electronics will last approximately 38 and a half hours as the battery has a capacity of 10000 mAh and the electronics draw an average of 260 mA (42 mA from Arduino, 200 mA from LCD display, 18 mA from extraneous components like resistors). At the highest power consuming feeder settings (7 feeding cycles an hour), the battery powering the motors will last 13.9 h as the battery has a capacity of 3000 mAh and the motors and motor driver draw around 216 mA (average 116 mA from the motors and 100 mA from the drivers).
The main electronic component controlling the whole device is an Arduino Uno which is a user-friendly microcontroller popular in education and hobbyist electronics. The electronics are also easy to source and assemble. Our OSF page includes a Gerber file for a PCB that connects all the electronic components. This Gerber file can be used by third parties like JLCPCB to manufacture the electronic circuits. This custom circuit reduces manufacturing as the connections use male or female pin connectors or screw terminals. To modify the device, for example, a speaker that buzzes before food is delivered or LORA module that allows for remote feeding can be added. The PCB design would need to be edited, or the new components hand-soldered in. Libraries are easy to install from the Arduino Uno IDE and provide time-saving features and documentation for free.
In August 2022, our team worked with zoo keepers to walk through a build of the device from start to finish, a process that took four hours. The device was satisfactorily constructed, with adequate rotation and timing between the two motors, leading to successful feeding. This feeder has been at gorilla habitat at Zoo Atlanta for over four months. At randomly designated intervals, it spreads 7 L of sweet potatoes across the habitat each day (Supplemental Video 2). The feeder holds a maximum of 10L of cut fruit or vegetables. The 7L of sweet potato provides 5600 kcal of food. Since a single gorilla's diet is 950-8000 kcal a day, our feeder provides a useful portion of food to an entire gorilla troop in a captive setting, and reduces the manual feeding by zoo staff. The results of this long-term feeding experiment will be published in a follow-up work.

Conclusion
We designed and built ForageFeeder, an open-source feeder for use in animal research and conservation. Unlike other automated feeders, our feeder dispenses large food chunks that are consumed by gorillas. This device takes only a few hours to build, is approximately $400, and is easy to maintain and operate. We hope that our device will provide animal enrichment as well as access and inspiration for future open source conservation technology tools.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Margaret Zhang is an undergraduate researcher in the Mechanical Engineering Department at Georgia Tech. Her research interests focus on creating accessible conservation technology for wildlife, understanding mammalian biomechanics, and building bioinspired robotic systems.
Dr. Andrew Schulz is a postdoctoral researcher at Max Planck Institute for Intelligent Systems (MPI-IS) currently studying cheetah locomotion for creating new reintroduction methods. He completed his PhD at Georgia Institute of Technology in Atlanta, GA in fall of 2022 studying the elephant trunk. Additionally, Andrew serves as the postdoc representative for the Division of Comparative Biomechanics for the Society of Integrative & Comparative Biology (SICB) as well as a community leader in conservation technology as a WILDLABS community manager, and Engineering for One Planet Network advisor. Outside of research communities he works on increasing the resources for neurodivergent identifying members of the science community as well as serves on the advisory board for Alveus Animal Sanctuary in Austin, TX.
Josh Meyerchick has over 14 years of experience working with gorillas at a number of zoological institutions. He is currently the Lead Keeper at Zoo Atlanta, which houses a population of 18 gorillas in 4 separate troops. In his current role he works with the gorilla care team to provide industry leading care in the fields of training, enrichment, and animal welfare. Prior to this he held positions at Zoo New England and The Birmingham Zoo Inc. He is a graduate of Indiana University Dr. David Hu is Professor of Mechanical Engineering and Biology and Adjunct Professor of Physics at Georgia Institute of Technology, and the author of the book "How to walk on water and climb up walls," published by Princeton University Press. He earned degrees in mathematics and mechanical engineering from M.I.T. and was an NSF Postdoctoral Fellow at New York University. He is a recipient of the National Science Foundation CAREER award, the Ig Nobel Prize in Physics, and the American Institute of Physics Science Communication Award. Currently, he is on the editorial boards of Proceedings of the Royal Society B and Journal of Experimental Biology.